package com.xma.springcloud.controller;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.xma.springcloud.common.ResponseResult;

/**
 * @Author: arthur
 * @License: (C) Copyright 2020-2028, xxx Corporation Limited.
 * @Contact: 413911174@qq.com
 * @Date: 2020/7/5 17:09
 * @Version: 1.0
 * @Description:
 */
public class CustomerBlockHandler {
    //必须是BlockException 异常 不然参数不对，无法找到方法，就去调用默认hanlerException方法了。
    public  static ResponseResult handlerException(BlockException exception){
        return new ResponseResult(446,"按客户自定义，global handlerException----1");
    }

    public static ResponseResult handlerException2(BlockException exception){
        return new ResponseResult(446,"按客户自定义，global handlerException----2");
    }
}
